#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main(void)
{
	int i = 0, j = 0;
	char ch = 0;
	while ((ch = getchar()) != '#')
	{
		if (ch == '\n')
			continue;
		i++;
		if (i % 8 == 0)
			printf("\n");
		putchar(ch);
		printf(" %d\n", ch);
	}

	return 0;
}